<!-- 绿色通道 - 患者列表 - 医疗记录 - 主诉与病史 界面 -->
<template>
  <div id="box">
    <!-- <div class="addContent"><el-button type="primary" style="float: right;margin-right: 40px; font-size: 16px;padding: 8px 15px;" @click="popup">新 增</el-button></div> -->
    <div class="outer">
      <el-row :gutter="24">
        <el-col :span="24">
          <div class="fr">
            <!-- <span class="mr-10">2022-06-22</span>
            <span class="mr-10">cszh1</span> -->
            <span class="mr-10">
              <el-button type="primary" size="small" @click="modifyHistory">保存</el-button>
            </span>
          </div>
        </el-col>
        <el-form label-width="120px">
          <el-col :span="24">
            <el-form-item label="主诉：">
              <el-input v-model="chiefComplaint" type="textarea" size="mini" style="width: 100%;" />
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="现病史：">
              <el-input v-model="precipitatingFactor" type="textarea" size="mini" style="width: 100%;" />
            </el-form-item>
          </el-col>
          <!-- td-start -->
          <el-col :span="24">
            <el-form-item label="既往病史：">
              <el-checkbox-group v-model="previousIllness" @change="checkChange">
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="既往体健">既往体健</el-checkbox>
                    <el-checkbox label="冠心病">冠心病</el-checkbox>
                    <el-checkbox label="高血压">高血压</el-checkbox>
                    <el-checkbox label="房颤">房颤</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="有既往史">有既往史</el-checkbox>
                    <el-checkbox label="心肌梗死">心肌梗死</el-checkbox>
                    <el-checkbox label="糖尿病">糖尿病</el-checkbox>
                    <el-checkbox label="肺动脉栓塞">肺动脉栓塞</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="扩张性心肌病">扩张性心肌病</el-checkbox>
                    <el-checkbox label="脑梗死">脑梗死</el-checkbox>
                    <el-checkbox label="消化道或泌尿道出血">消化道或泌尿道出血</el-checkbox>
                    <el-checkbox label="脂肪代谢紊乱">脂肪代谢紊乱</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="脑出血">脑出血</el-checkbox>
                    <el-checkbox label="大手术史">大手术史</el-checkbox>
                    <el-checkbox label="吸烟史">吸烟史</el-checkbox>
                    <el-checkbox label="头颅外伤史">头颅外伤史</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="周围血管病">周围血管病</el-checkbox>
                    <el-checkbox label="饮酒史">饮酒史</el-checkbox>
                    <el-checkbox label="其他">其他</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="哮喘">哮喘</el-checkbox>
                    <el-checkbox label="短暂性脑缺血发作">短暂性脑缺血发作</el-checkbox>
                  </div>
                </div>
              </el-checkbox-group>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="伴随症状：">
              <el-checkbox-group v-model="concomitantSymptom">
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="昏迷" class="div_hl">昏迷</el-checkbox>
                    <el-checkbox label="水肿" class="div_hl">水肿</el-checkbox>
                    <el-checkbox label="败血症" class="div_hl">败血症</el-checkbox>
                    <el-checkbox label="钝痛" class="div_hl">钝痛</el-checkbox>
                    <el-checkbox label="抑郁" class="div_hl">抑郁</el-checkbox>
                    <el-checkbox label="蛋白尿" class="div_hl">蛋白尿</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="呼吸困难">呼吸困难</el-checkbox>
                    <el-checkbox label="恶心">恶心</el-checkbox>
                    <el-checkbox label="反应迟钝">反应迟钝</el-checkbox>
                    <el-checkbox label="贫血">贫血</el-checkbox>
                    <el-checkbox label="血压高">血压高</el-checkbox>
                    <el-checkbox label="反复出血">反复出血</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="充血">充血</el-checkbox>
                    <el-checkbox label="剧痛">剧痛</el-checkbox>
                    <el-checkbox label="二尖瓣脱垂">二尖瓣脱垂</el-checkbox>
                    <el-checkbox label="出血">出血</el-checkbox>
                    <el-checkbox label="腹痛">腹痛</el-checkbox>
                    <el-checkbox label="传导阻滞">传导阻滞</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="休克">休克</el-checkbox>
                    <el-checkbox label="脓肿">脓肿</el-checkbox>
                    <el-checkbox label="氮质血症">氮质血症</el-checkbox>
                    <el-checkbox label="颅内出血">颅内出血</el-checkbox>
                    <el-checkbox label="吞咽困难">吞咽困难</el-checkbox>
                    <el-checkbox label="便秘">便秘</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="继发感染">继发感染</el-checkbox>
                    <el-checkbox label="步态不稳">步态不稳</el-checkbox>
                    <el-checkbox label="近曲小管受累">近曲小管受累</el-checkbox>
                    <el-checkbox label="失血过多">失血过多</el-checkbox>
                    <el-checkbox label="意识丧失">意识丧失</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="高热">高热</el-checkbox>
                    <el-checkbox label="复视">复视</el-checkbox>
                    <el-checkbox label="尿外渗">尿外渗</el-checkbox>
                    <el-checkbox label="头皮平直裂口">头皮平直裂口</el-checkbox>
                    <el-checkbox label="角膜烧伤">角膜烧伤</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="腹膜炎">腹膜炎</el-checkbox>
                    <el-checkbox label="唇外翻">唇外翻</el-checkbox>
                    <el-checkbox label="腹腔种植">腹腔种植</el-checkbox>
                    <el-checkbox label="烧伤后恶心呕吐">烧伤后恶心呕吐</el-checkbox>
                    <el-checkbox label="关节液渗出">关节液渗出</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="下颔后缩">下颔后缩</el-checkbox>
                    <el-checkbox label="血尿">血尿</el-checkbox>
                    <el-checkbox label="眼球震颤">眼球震颤</el-checkbox>
                    <el-checkbox label="烧伤创面淡黄色粘稠">烧伤创面淡黄色粘稠</el-checkbox>
                    <el-checkbox label="关节积液">关节积液</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="消化道出血">消化道出血</el-checkbox>
                    <el-checkbox label="瘙痒">瘙痒</el-checkbox>
                    <el-checkbox label="全血细胞减少">全血细胞减少</el-checkbox>
                    <el-checkbox label="发音改变">发音改变</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="气腹症">气腹症</el-checkbox>
                    <el-checkbox label="口腔溃烂">口腔溃烂</el-checkbox>
                    <el-checkbox label="黏膜出现血点">黏膜出现血点</el-checkbox>
                    <el-checkbox label="腹壁广泛性钙质沉着">腹壁广泛性钙质沉着</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="不完全流产">不完全流产</el-checkbox>
                    <el-checkbox label="死血痛">死血痛</el-checkbox>
                    <el-checkbox label="术后腹胀">术后腹胀</el-checkbox>
                    <el-checkbox label="头皮撕裂伤">头皮撕裂伤</el-checkbox>
                  </div>
                </div>
                <div class="div-lineList">
                  <div class="div_hl">
                    <el-checkbox label="闭经">闭经</el-checkbox>
                    <el-checkbox label="鲜血便">鲜血便</el-checkbox>
                    <el-checkbox label="脾大">脾大</el-checkbox>
                    <el-checkbox label="头皮血肿">头皮血肿</el-checkbox>
                  </div>
                </div>
              </el-checkbox-group>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="过敏史：">
              <el-checkbox-group v-model="allergyHistory">
                <el-checkbox label="造影剂或碘过敏">造影剂或碘过敏</el-checkbox>
                <el-checkbox label="青霉素类">青霉素类</el-checkbox>
                <el-checkbox label="氨基糖代类">氨基糖代类</el-checkbox>
                <el-checkbox label="头孢类">头孢类</el-checkbox>
                <el-checkbox label="不详">不详</el-checkbox>
                <el-checkbox label="其他">其他</el-checkbox>
                <el-checkbox label="无">无</el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="语音：">
              <figure>
                <figcaption>录音播放:</figcaption>
                <audio controls src="/media/cc0-audio/t-rex-roar.mp3">
                  <a href="/media/cc0-audio/t-rex-roar.mp3"> Download Audio </a>
                </audio>
              </figure>
            </el-form-item>
          </el-col>
          <!-- td-end -->
        </el-form>
      </el-row>
    </div>

    <!-- <el-dialog title="新增病史" :visible.sync="newincalogase" width="60%" :before-close="handleClose">
      <div class="outer_layer">
        <el-row :gutter="24">
          <el-form label-width="120px">
            <el-col :span="12">
              <el-form-item label="主诉">
                <el-input v-model="zhusu" size="mini" style="width: 400px;" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="现病史">
                <el-input v-model="xianbingshi" size="mini" style="width: 400px;" />
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="既往史">
                <el-checkbox-group v-model="jiwangshi">
                  <el-checkbox-button label="体建">体建</el-checkbox-button>
                  <el-checkbox-button label="高血压">高血压</el-checkbox-button>
                  <el-checkbox-button label="糖尿病">糖尿病</el-checkbox-button>
                  <el-checkbox-button label="肝炎">肝炎</el-checkbox-button>
                  <el-checkbox-button label="疫区生存">疫区生存</el-checkbox-button>
                  <el-checkbox-button label="手术史">手术史</el-checkbox-button>
                </el-checkbox-group>
              </el-form-item>
            </el-col>
          </el-form>
        </el-row> -->
    <!-- <el-row :gutter="24">
          <el-col :offset="20" :span="2">
            <el-button type="primary" @click="addHistory">保 存</el-button>
          </el-col>
        </el-row> -->
    <!-- </div> -->
    <!-- <span slot="footer" class="dialog-footer">
        <el-button @click="newincalogase = false">取 消</el-button> -->
    <!-- <el-button type="primary" @click="dialogVisible = false">确 定</el-button> -->
    <!-- <el-button type="primary" @click="addHistory">保 存</el-button>
      </span>
    </el-dialog> -->
  </div>
</template>

<script>
import { getHistory, addHistoryPost } from '@/api/green-channel/medicalHistory.js'
import format from '@/utils/format'
export default {
  // 由主页面(父组件) 接收来的, 选择项的数据
  props: ['checkrowdata'], // 由主页面(父组件) 接收来的, 选择项的数据
  data() {
    return {
      chiefComplaint: '',
      precipitatingFactor: '',
      concomitantSymptom: [],
      previousIllness: [],
      allergyHistory: [],
      /* 新增 */
      newincalogase: false,
      /* end ------------ */
      // 主诉与病史
      tellSymptoms: [], // 主诉症状
      tellSymptomsList: [
        { value: '1', label: '一侧肢体无力、麻木、笨拙' },
        { value: '2', label: '一侧面部麻木或口角歪斜' },
        { value: '3', label: '说话不清或理解语言困难' },
        { value: '4', label: '双眼向一侧凝视' },
        { value: '5', label: '一侧或双眼视力丧失或模糊' },
        { value: '6', label: '视物旋转或平衡障碍，眩晕伴呕吐' },
        { value: '7', label: '既往少见的严重头疼、呕吐' },
        { value: '8', label: '意识障碍或抽搐' }
      ], // 主诉症状列表
      seiZure: '', // 入院评估
      past: [], // 既往病史
      pastList: [
        { value: '1', label: '高血压' },
        { value: '2', label: '糖尿病' },
        { value: '3', label: '冠心病' },
        { value: '4', label: '房颤' },
        { value: '5', label: '脑梗死' },
        { value: '6', label: '脑出血' },
        { value: '7', label: '消化道出血' },
        { value: '8', label: '大手术' },
        { value: '9', label: '头颅外伤' },
        { value: '10', label: '肿瘤病史' },
        { value: '11', label: '其他病史' },
        { value: '12', label: '蛛网膜下腔出血' },
        { value: '13', label: 'TIA' },
        { value: '14', label: '血脂异常' },
        { value: '15', label: '心肌梗死' },
        { value: '16', label: '先天性心脏病' },
        { value: '17', label: '瓣膜性心脏病' },
        { value: '18', label: '其他类型心脏疾病' },
        { value: '19', label: '外周动脉疾病' },
        { value: '20', label: '动脉瘤破裂' }
      ],
      /* 家族史 */
      apoplexy: '3', // 卒中家族史
      coronary: '3', // 冠心病家族史
      hypertension: '3', // 高血压家族史
      diabetes: '3', // 糖尿病家族史
      Dyslipidemia: '3', // 血脂异常家族史
      Intracranial: '3', // 颅内动脉瘤家族史
      /* 入院前用药史 */
      Antiplatelet: '3', // 抗血小板药
      Anticoagulation: '3', // 抗凝药
      stepDown: '3', // 降压药
      Regulating: '3', // 调解血脂药
      Hypoglycemic: '3', // 降糖药
      other: '3', // 其他药物
      Unused: '3', // 未用药
      // 备注
      input: '',
      getHistoryData: null,
      dataTemplate: {
        id: null,
        dispatchId: this.checkrowdata.dispatchId,
        medicalId: this.checkrowdata.medicalId,
        userId: this.checkrowdata.userId,
        symptom: [],
        cerebralHernia: '',
        previousIllness: [],
        isFamilyHistoryOfStroke: '',
        isFamilyHistoryOfCHD: '',
        isFamilyHistoryOfHypertension: '',
        isFamilyHistoryOfDM: '',
        isFamilyHistoryOfDyslipidemia: '',
        isFamilyHistoryOfAneurysm: '',
        isHistoryOfAntiplateletDrug: '',
        isHistoryOfAnticoagulantDrug: '',
        isHistoryOfAntihypertensiveDrug: '',
        isHistoryOfLipidRegulatingDrug: '',
        isHistoryOfHypoglycemiDrug: '',
        isHistoryOfOtherDrug: '',
        isHistoryOfNoDrug: '',
        remark: ''
      }
    }
  },
  computed: {},
  updated() { },
  created() {
    this.diseasehistory()
  },
  methods: {
    /* 新增 */
    // popup() {
    // this.getHistoryData = [this.dataTemplate]
    // console.log(this.getHistoryData)
    // this.newincalogase = true
    // },
    checkChange() {
      if (this.previousIllness[this.previousIllness.length - 1] === '既往体健') {
        this.previousIllness = []
        this.previousIllness.push('既往体健')
      } else {
        const previousIllness_index = this.previousIllness.indexOf('既往体健')
        if (previousIllness_index !== -1) {
          this.previousIllness.splice(previousIllness_index, 1)
        }
      }
    },

    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => { })
    },
    /* end ------- */
    // 病史接口
    diseasehistory() {
      this.chiefComplaint = ''
      this.concomitantSymptom = []
      this.previousIllness = []
      this.allergyHistory = []
      const dispatchid = this.checkrowdata.dispatchId
      const apiToken = this.$store.getters.apiToken
      getHistory(dispatchid, apiToken).then(res => {
        if (res.data) {
          if (res.data.diseaseHistoriesModel) {
            this.getHistoryData = res.data.diseaseHistoriesModel
            this.chiefComplaint = res.data.diseaseHistoriesModel.chiefComplaint ? res.data.diseaseHistoriesModel.chiefComplaint : ''

            const concomitantData = res.data.diseaseHistoriesModel.concomitantSymptom ? res.data.diseaseHistoriesModel.concomitantSymptom : ''
            try {
              this.concomitantSymptom = concomitantData ? JSON.parse(JSON.parse(concomitantData)) : []
            } catch (error) {
              this.concomitantSymptom = concomitantData ? JSON.parse(concomitantData) : []
            }
            const previousData = res.data.diseaseHistoriesModel.previousIllness ? res.data.diseaseHistoriesModel.previousIllness : ''
            try {
              this.previousIllness = previousData ? JSON.parse(JSON.parse(previousData)) : []
            } catch (error) {
              this.previousIllness = previousData ? JSON.parse(previousData) : []
            }
            const allergyData = res.data.diseaseHistoriesModel.allergyHistory ? res.data.diseaseHistoriesModel.allergyHistory : ''
            try {
              this.allergyHistory = allergyData ? JSON.parse(JSON.parse(allergyData)) : []
            } catch (error) {
              this.allergyHistory = allergyData ? JSON.parse(allergyData) : []
            }
            const precipitatingFactor = res.data.diseaseHistoriesModel.precipitatingFactor ? res.data.diseaseHistoriesModel.precipitatingFactor : ''
            try {
              this.precipitatingFactor = precipitatingFactor ? JSON.parse(JSON.parse(precipitatingFactor)) : []
            } catch (error) {
              this.precipitatingFactor = precipitatingFactor ? JSON.parse(precipitatingFactor) : []
            }
          }
        }
      })
    },

    // 修改病史
    modifyHistory() {
      let data = {}
      let newConcomitantSymptom = ''
      newConcomitantSymptom = JSON.stringify(this.concomitantSymptom)
      let newpreviousIllness = ''
      newpreviousIllness = JSON.stringify(this.previousIllness)
      let newallergyData = ''
      newallergyData = JSON.stringify(this.allergyHistory)
      const timeDate = format(new Date(), 'YYYY-MM-DD HH:mm:ss')
      data = {
        allergyHistory: newallergyData,
        apiToken: this.$store.getters.apiToken,
        attackDegree: this.getHistoryData ? this.getHistoryData.attackDegree ? this.getHistoryData.attackDegree : '' : '',
        chiefComplaint: this.chiefComplaint,
        concomitantSymptom: newConcomitantSymptom,
        createdAt: this.getHistoryData ? this.getHistoryData.createdAt ? this.getHistoryData.createdAt : timeDate : timeDate,
        department: this.getHistoryData ? this.getHistoryData.department ? this.getHistoryData.department : '' : '',
        dispatchId: this.checkrowdata.dispatchId,
        distressCase: this.getHistoryData ? this.getHistoryData.distressCase ? this.getHistoryData.distressCase : '' : '',
        distressCaseDetail: this.getHistoryData ? this.getHistoryData.distressCaseDetail ? this.getHistoryData.distressCaseDetail : '' : '',
        distributionRange: this.getHistoryData ? this.getHistoryData.distributionRange ? this.getHistoryData.distributionRange : '' : '',
        duration: this.getHistoryData ? this.getHistoryData.duration ? this.getHistoryData.duration : '' : '',
        emergencyType: this.getHistoryData ? this.getHistoryData.emergencyType ? this.getHistoryData.emergencyType : '' : '',
        id: this.getHistoryData ? this.getHistoryData.id ? this.getHistoryData.id : '' : '',
        isFamilyHistoryOfCD: this.getHistoryData ? this.getHistoryData.isFamilyHistoryOfCD ? this.getHistoryData.isFamilyHistoryOfCD : '' : '',
        isHistoryOfAnticoagulantDrug: this.getHistoryData ? this.getHistoryData.isHistoryOfAnticoagulantDrug ? this.getHistoryData.isHistoryOfAnticoagulantDrug : '' : '',
        isHistoryOfAntihypertensiveDrug: this.getHistoryData ? this.getHistoryData.isHistoryOfAntihypertensiveDrug ? this.getHistoryData.isHistoryOfAntihypertensiveDrug : '' : '',
        isHistoryOfAntiplateletDrug: this.getHistoryData ? this.getHistoryData.isHistoryOfAntiplateletDrug ? this.getHistoryData.isHistoryOfAntiplateletDrug : '' : '',
        isHistoryOfAspirin: this.getHistoryData ? this.getHistoryData.isHistoryOfAspirin ? this.getHistoryData.isHistoryOfAspirin : '' : '',
        isHistoryOfHypoglycemiDrug: this.getHistoryData ? this.getHistoryData.isHistoryOfHypoglycemiDrug ? this.getHistoryData.isHistoryOfHypoglycemiDrug : '' : '',
        isHistoryOfLipidRegulatingDrug: this.getHistoryData ? this.getHistoryData.isHistoryOfLipidRegulatingDrug ? this.getHistoryData.isHistoryOfLipidRegulatingDrug : '' : '',
        medicalId: this.checkrowdata.medicalId,
        mitigationMethod: this.getHistoryData ? this.getHistoryData.mitigationMethod ? this.getHistoryData.mitigationMethod : '' : '',
        nature: this.getHistoryData ? this.getHistoryData.nature ? this.getHistoryData.nature : '' : '',
        occurrenceSite: this.getHistoryData ? this.getHistoryData.occurrenceSite ? this.getHistoryData.occurrenceSite : '' : '',
        painFreq: this.getHistoryData ? this.getHistoryData.painFreq ? this.getHistoryData.painFreq : '' : '',
        precipitatingFactor: this.getHistoryData ? this.getHistoryData.precipitatingFactor ? this.getHistoryData.precipitatingFactor : '' : '',
        previousIllness: newpreviousIllness,
        radiationSite: this.getHistoryData ? this.getHistoryData.radiationSite ? this.getHistoryData.radiationSite : '' : '',
        remark: this.getHistoryData ? this.getHistoryData.remark ? this.getHistoryData.remark : '' : '',
        updatedAt: timeDate,
        userId: this.checkrowdata.userId,
        userName: this.getHistoryData ? this.getHistoryData.userName ? this.getHistoryData.userName : '' : ''
      }
      addHistoryPost(data)
        .then(res => {
          if (res.code === 0 || res.code === 200) {
            this.$message({
              message: '保存成功',
              type: 'success'
            })
            this.diseasehistory()
          } else {
            this.$message({
              message: '保存失败',
              type: 'error'
            })
          }
        })
        .catch(() => {
          this.$message({
            message: '保存失败',
            type: 'error'
          })
        })
    },

    // 保存病史
    addHistory() {
      let newTellSSymptoms = ''
      let newpast = ''
      if (this.tellSymptoms) {
        newTellSSymptoms = this.tellSymptoms.join('|')
      } else {
        newTellSSymptoms = ''
      }
      if (this.past) {
        newpast = this.past.join('|')
      } else {
        newpast = ''
      }
      const data = {
        id: null,
        dispatchId: this.checkrowdata.dispatchId,
        medicalId: this.checkrowdata.medicalId,
        userId: this.checkrowdata.userId,
        symptom: newTellSSymptoms,
        cerebralHernia: this.seiZure,
        previousIllness: newpast,
        isFamilyHistoryOfStroke: this.apoplexy,
        isFamilyHistoryOfCHD: this.coronary,
        isFamilyHistoryOfHypertension: this.hypertension,
        isFamilyHistoryOfDM: this.diabetes,
        isFamilyHistoryOfDyslipidemia: this.Dyslipidemia,
        isFamilyHistoryOfAneurysm: this.Intracranial,
        isHistoryOfAntiplateletDrug: this.Antiplatelet,
        isHistoryOfAnticoagulantDrug: this.Anticoagulation,
        isHistoryOfAntihypertensiveDrug: this.stepDown,
        isHistoryOfLipidRegulatingDrug: this.Regulating,
        isHistoryOfHypoglycemiDrug: this.Hypoglycemic,
        isHistoryOfOtherDrug: this.other,
        isHistoryOfNoDrug: this.Unused,
        remark: this.input
      }
      console.log(data)
      // addHistoryPostStroke(data)
      //   .then(res => {
      //     console.log(res)
      //     if (res.code === 0) {
      //       this.$message({
      //         message: '保存成功',
      //         type: 'success'
      //       })
      //       this.newincalogase = false
      //     }
      //   })
      //   .catch(() => {
      //     this.$message({
      //       message: '保存失败',
      //       type: 'error'
      //     })
      //   })
    }
  }
}
</script>

<style lang="scss" scoped>
#box {
  width: 100%;
  height: 100%;
  padding: 10px 20px;
}

.addContent {
  width: 100%;
  height: 50px;
  border-bottom: 1px solid #dfdee3;
}

.outer {
  width: 100%;
  background-color: #f9f9f9;
  margin-top: 10px;
  padding: 10px;
}

.outer_layer {
  width: 100%;
  height: 500px;
  overflow-y: scroll;
  overflow-x: hidden;
}

.el-row {
  margin: 0 0 15px 0;

  &:last-child {
    margin-bottom: 0;
  }
}

.el-col {
  margin-bottom: 10px;
}

.el-checkbox-group {
  margin-left: 10px;
}

.el-radio-group {
  margin-left: 10px;
  margin-top: 10px;
}

.el-input {
  margin-top: 10px;
}

.el-form-item {
  margin-bottom: 16px;
}

.botton {
  background-color: #f9f9f9;
  margin-right: 20px;
  margin-left: 10px;
  padding: 10px;
}

.div-lineList {
  display: inline-block;
  vertical-align: top;
}

.div_hl>.el-checkbox {
  display: block;
  width: 10%;

}
</style>
